package com.base.self.service;

import com.base.result.ResponseResult;
import com.base.self.dto.ptTeam.PtCurrentVo;
import com.base.self.dto.ptTeam.PtCurrentVo2;
import com.base.self.dto.ptTeam.PtCurrentWebListDTO;
import com.base.self.dto.ptTeam.PtTeamWebListDto;
import com.base.self.entity.PtCurrent;
import com.baomidou.mybatisplus.extension.service.IService;
import com.base.self.entity.Ptintegral;

import java.math.BigDecimal;

public interface IPtCurrentService extends IService<PtCurrent> {
    /**
     * 加团行为
     * @Param userId 用户ID
     * @Param sub1 团首
     * @Param goodsId 商品ID
     * @Param teamOrderNo 参团订单号
     * @Param orderNo 订单号
     */
    ResponseResult autoInTeam(String userId, String sub1, String goodsId,String teamOrderNo ,String orderNo);

    /**
     * 创团行为
     * @Param userId 用户ID
     * @Param sub1 团首
     * @Param goodsId 商品ID
     */
    ResponseResult beginInTeanm(String userId, String goodsId, String orderNo);

    /**
     * 查询某个用户的所有团
     * @Param userId 用户ID
     * @Param sid 商品编号
     */
    ResponseResult findTeamByUserIdAndSid(String userId, String sid,String orderNo , Integer pageNo,Integer PageSize);

    /**
     *  判断某个用户对于某个商品能否参团(是否参与过)
     */
    ResponseResult judgeTeamByUserIdAndSid(String userId, String sid);

    PtCurrentVo currentToVo(PtCurrent item);

    PtCurrentVo2 currentToVo2(PtCurrent ptCurrent);

    PtCurrent selectCurrentByUserIdAndGoodsId(String userId, String goodsId);

    PtCurrent selectCurrentByUserIdAndOrderNo(String userId, String orderNo);

    ResponseResult selectWebList(PtCurrentWebListDTO ptCurrentWebListDTO);

    Integer chaTP(String userId,String orderNo);
    // 赠送积分按照分区比例
   void sendPtIntegral(Integer sid , String subId, BigDecimal price);
}
